main(n,s,v,l)
{
	for(gets(&n);~scanf("%d",&n);printf("%d %d\n",s,s/n))
		for(s=0,l=n;l--;scanf("%d",&v),s+=v);
}
